we-dont-have-the-needed-fonts
authorDebian LibreOffice Maintainers <debian-openoffice@lists.debian.org>
Sat, 13 Dec 2025 08:32:27 +0000 (09:32 +0100)
committerRene Engelhard <rene@debian.org>
Sat, 13 Dec 2025 08:32:27 +0000 (09:32 +0100)
Gbp-Pq: Name we-dont-have-the-needed-fonts.diff

sw/qa/core/text/text.cxx
vcl/qa/cppunit/complextext.cxx
vcl/qa/cppunit/pdfexport/pdfexport2.cxx

index 8487c15002b1118b987f6373983aa9fc7cf5764b..1994ed97b765a11d5f96cd4e72edbfff4d01872e 100644 (file)
@@ -9,6 +9,8 @@
 
 #include <swmodeltestbase.hxx>
 
+#include <config_fonts.h>
+
 #include <memory>
 
 #include <com/sun/star/text/BibliographyDataField.hpp>
@@ -1594,6 +1596,8 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testParaUpperMarginFlyIntersect)
     CPPUNIT_ASSERT_EQUAL(521, nHeight);
 }
 
+/* needs Source Han Serif SC*/
+#if HAVE_MORE_FONTS
 CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTdf129810)
 {
     // Load the document.
@@ -1630,6 +1634,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTdf129810)
         }
     }
 }
+#endif
 
 CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testScriptinfosurrogatePairs)
 {
index 9be428b591289d01138ef1b0e9bfa08275b08125..a833314bd23d7b6d93e518621faf7c52fbc21356 100644 (file)
@@ -792,49 +792,6 @@ CPPUNIT_TEST_FIXTURE(VclComplexTextTest, testTdf165510)
     }
 }
 
-CPPUNIT_TEST_FIXTURE(VclComplexTextTest, testTdf154104)
-{
-    ScopedVclPtrInstance<VirtualDevice> pOutDev;
-
-    vcl::Font aBaseFont{ u"David Libre"_ustr, u"Regular"_ustr, Size{ 0, 72 } };
-    pOutDev->SetFont(aBaseFont);
-
-    vcl::Font aFallbackFont{ u"Noto Sans Arabic"_ustr, u"Regular"_ustr, Size{ 0, 72 } };
-    pOutDev->ForceFallbackFont(aFallbackFont);
-
-    pOutDev->SetLayoutMode(vcl::text::ComplexTextLayoutFlags::BiDiRtl
-                           | vcl::text::ComplexTextLayoutFlags::BiDiStrong);
-
-    auto aText = u"\u05D0\u05D0\u05D0\u0644\u0627"_ustr;
-    KernArray aKernArray = { 100, 200, 300, 350, 400 };
-    auto pLayout = pOutDev->ImplLayout(aText, /*nIndex*/ 0, /*nLen*/ aText.getLength(),
-                                       /*rLogicPos*/ Point(0, 0), /*nLogicWidth*/ 0, aKernArray);
-
-    // Fallback must have happened for this test to be meaningful
-    auto pMultiLayout = dynamic_cast<MultiSalLayout*>(pLayout.get());
-    CPPUNIT_ASSERT(pMultiLayout);
-
-    std::vector<double> aCharX;
-
-    const GlyphItem* pGlyph = nullptr;
-    basegfx::B2DPoint stPos;
-    int nCurrPos = 0;
-    while (pLayout->GetNextGlyph(&pGlyph, stPos, nCurrPos))
-    {
-        aCharX.push_back(stPos.getX());
-    }
-
-    // tdf#154104 caused overlapping glyphs in fallback runs:
-    //                           { -295.0, -195.0, -95.0, -341.0 }
-    std::vector<double> aRefCharX{ -245.0, -145.0, -45.0, -341.0 };
-
-    CPPUNIT_ASSERT_EQUAL(aRefCharX.size(), aCharX.size());
-    for (size_t i = 0; i < aRefCharX.size(); ++i)
-    {
-        CPPUNIT_ASSERT_DOUBLES_EQUAL(aRefCharX.at(i), aCharX.at(i), /*delta*/ 0.2);
-    }
-}
-
 CPPUNIT_TEST_FIXTURE(VclComplexTextTest, testTdf163761)
 {
     ScopedVclPtrInstance<VirtualDevice> pOutDev;
index bddf05c24b11f33dec04ae65abc3b8072c91716f..b0f547ad4c70d8d8234da380633f4e15aa71f79f 100644 (file)
Binary files a/vcl/qa/cppunit/pdfexport/pdfexport2.cxx and b/vcl/qa/cppunit/pdfexport/pdfexport2.cxx differ